-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ohadn/qm31 operations #1938
base: ohadn/qm31_arithmetics-in-math_utils
Are you sure you want to change the base?
Ohadn/qm31 operations #1938
Conversation
|
e15c6e6
to
1d1be8b
Compare
Benchmark Results for unmodified programs 🚀
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ohadn/qm31_arithmetics-in-math_utils #1938 +/- ##
========================================================================
- Coverage 96.41% 96.39% -0.03%
========================================================================
Files 102 102
Lines 41871 41993 +122
========================================================================
+ Hits 40371 40479 +108
- Misses 1500 1514 +14 ☔ View full report in Codecov by Sentry. |
efdb5e3
to
6dd3870
Compare
b4da427
to
eb339d8
Compare
eb339d8
to
772ae29
Compare
d6d9a96
to
d1f230b
Compare
772ae29
to
074772b
Compare
d1f230b
to
4bca3db
Compare
074772b
to
06b5260
Compare
4bca3db
to
ea9f93f
Compare
c9356e0
to
c13233c
Compare
ea9f93f
to
ef1aa46
Compare
c13233c
to
bd6140f
Compare
ef1aa46
to
cbd7519
Compare
bd6140f
to
e927070
Compare
cbd7519
to
ee011aa
Compare
0de9b66
to
222bf81
Compare
86e011f
to
668db19
Compare
222bf81
to
f19db37
Compare
4950171
to
42dabda
Compare
f19db37
to
f355115
Compare
42dabda
to
597c04f
Compare
f355115
to
bbc935a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 15 files at r2, 7 of 11 files at r3, all commit messages.
Reviewable status: 12 of 16 files reviewed, 2 unresolved discussions (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @Oppen, @pefontana, and @yuvalsw)
vm/src/vm/decoding/decoder.rs
line 121 at r3 (raw file):
|| pc_update != PcUpdate::Regular || opcode != Opcode::AssertEq {
ap_update
vm/src/vm/vm_core.rs
line 504 at r3 (raw file):
.mark_as_accessed(operands_addresses.op1_addr); if instruction.opcode_extension == OpcodeExtension::Blake {
why did this make sense but with the QM31 we need a totally different approach? @JulianGCalderon
597c04f
to
84ec321
Compare
bbc935a
to
6e168b8
Compare
84ec321
to
9cdce6f
Compare
6e168b8
to
ada9240
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 6 files at r4.
Reviewable status: 9 of 16 files reviewed, 2 unresolved discussions (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @ohad-nir-starkware, @Oppen, @pefontana, and @yuvalsw)
ada9240
to
3ef056d
Compare
3ef056d
to
286ffff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 8 of 17 files reviewed, 2 unresolved discussions (waiting on @DavidLevitGurevich, @fmoletta, @gabrielbosio, @igaray, @juanbono, @JulianGCalderon, @Oppen, @pefontana, and @yuvalsw)
vm/src/vm/vm_core.rs
line 504 at r3 (raw file):
Previously, DavidLevitGurevich wrote…
why did this make sense but with the QM31 we need a totally different approach? @JulianGCalderon
I refactored deduce_op0, deduce_op1, compute_res
, the flow is now more uniform for Stone
and QM31Operation
.
However, it did import OpcodeExtension
to relocatable.rs
which is something I feel unsure about.
Also, in deduce_op0
and deduce_op1
for Res::Mul
the flows of Stone
and QM31Operation
do diverge within the function itself because it already deconstructs Felts
out of MaybeRelocatable
making it unsuitable to be computed inside relocatable.rs
.
I could place the computation inside math_utils
but it will introduce OpcodeExtension
to math_utils
and also separate the computation of div
from that of add, sub, mul
.
Another option is to open another utils file specifically for those 4 functions or to place them inside vm_core.rs
.
let me know what you think.
vm/src/vm/decoding/decoder.rs
line 121 at r3 (raw file):
Previously, DavidLevitGurevich wrote…
ap_update
Done.
QM31Operations
Description
add packed reduced qm31 add, mul, sub, div via OpcodeExtension::QM31Operations.
Description of the pull request changes and motivation.
Checklist
This change is